<script setup>
import GodLight from "@/components/LoginDesign/GodLight.vue";
import ParticleStream from "@/components/ParticleStream/index.vue";
import ParticleHeart from "@/components/ParticleHeart/index.vue"
import DataFlowBg from "@/components/DataFlowBg/index.vue"
import ThreeEarth from "@/components/ThreeEarth/index.vue"
import Earth from "@/components/ThreeEarth/earth.vue"

const flag = ref(5)
const options = ref([
  {value: 0, label: 'GodLight'},
  {value: 1, label: 'ParticleStream'},
  {value: 2, label: 'ParticleHeart'},
  {value: 3, label: 'DataFlowBg'},
  {value: 4, label: 'Earth'},
  {value: 5, label: 'ThreeEarth'},

])
function change(v) {
  console.log(v);
}
</script>

<template>
<div class="toggle-flag-container">
  <el-select value-key="value" v-model="flag" @change="change"
             placeholder="选择背景" class="select">
    <el-option
        v-for="item in options"
        :key="item.value"
        :label="item.label"
        :value="item.value"
    />
  </el-select>
  <god-light v-if="flag === 0" />
  <particle-heart v-if="flag === 1" />
  <data-flow-bg v-if="flag === 2" />
  <earth v-if="flag === 4"></earth>
  <three-earth v-if="flag === 5"></three-earth>
</div>
</template>

<style scoped lang="stylus">
.toggle-flag-container
  position absolute
  top 0
  left 0
.select
  position absolute
  top 10px
  left 10px
  z-index 2
  width 200px
</style>